<h1>编辑产品</h1>

<% form_for(@product) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label(:title, "标题") %><br />
    <%= f.text_field :title %>
  </p>
  <p>
    <%= f.label(:description, "描述")%><br />
    <%= f.text_area :description %>
  </p>
  <p>
    <%= f.label :image_url %><br />
    <%= f.text_field :image_url %>
  </p>
  <p>
    <%= f.label(:price, "价格") %><br />
    <%= f.text_field :price %>
  </p>
  <p>
    <%= f.label(:date_available, "时间") %><br />
    <%= f.datetime_select :date_available %>
  </p>
  <p>
    <%= f.submit "更新" %>
  </p>
<% end %>

<%= link_to '显示', @product %> |
<%= link_to '返回', products_path %>
